package com.gitee.foojolt.liben;

import com.gitee.foojolt.liben.mapper.BookMapper;
import com.gitee.foojolt.liben.model.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@Controller
public class BookListController {

    @Autowired
    private BookMapper mapper;

    @GetMapping("book/list")
    public @ResponseBody List<Book> list() {
        return mapper.selectList(null);
    }
}
